/*
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2022-12-15 13:33:46
 * @LastEditTime: 2023-12-13 20:42:01
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \HelloWorldd:\Developer\WGJ\VSCode_WorkSpace\Cpp\c-learning\code\io\scanf.c
 * @Description:
 */
#include <stdio.h>
#include <stdlib.h>

#define STRSIZE 32

int main() {
    int i;
    float f;
    char ch, str[STRSIZE];
    int ret;

    printf("Please enter:\n");

    scanf("%d", &i);
    ch = getchar();

    printf("i = %d,ch = %d\n", i, ch);

#if 0
    while (1)
    {
        ret = scanf("%d", &i);
        if (ret != 1)
        {
            printf("Enter error!\n");
            break;
        }

        printf("i = %d\n", i);
    }
#endif
    // scanf("%s", str);
    // printf("%s\n", str);

    // scanf("%d,%f", &i, &f);
    // printf("i = %d\n", i);
    // printf("f = %f\n", f);

    exit(0);
}